#include <iostream>
#include <array>
using namespace std;
int main()
{
    array<int, 5> values;
    int h = 1;
    auto first = values.rbegin();
    auto last = values.rend();
    //初始化values为{5,4,3,2,1}
    while (first != last)
    {
        *first = h;
        first++;
        h++;
    }

    first = values.rbegin();
    while (first != last)
    {
        cout << *first << " ";
        first++;
    }
    return 0;
}